package gof_002_结构型_Structural.gof_001_代理_Proxy.gof_001_StaticProxy;

public class ProxyClient {
    public static void main(String[] args) {

        /**
         * 活动公司想要找歌手唱歌
         * 但是实际是找了代理人
         * 由代理人去找歌手,代理人可以找 王菲,也可以找 韩红
         */
        Agent agent = new Agent(new WangFei());


        Singer singer = agent;

        singer.connection();
        singer.bargain();
        singer.payEarnestMoney();
        singer.sing();
        singer.payBalanceDue();

    }
}